package model.game;

import java.util.ArrayList;
import java.util.List;

import model.person.Person;

public class OwnTeam implements Team {
	private String name;
	private List<Person> members = new ArrayList<Person>();

	public OwnTeam(String name) {
		this.name = name;
	}

	public void addPerson(Person person) {
		members.add(person);
	}

	public void removePerson(Person person) {
		members.remove(person);
	}

	public List<Person> getMembers() {
		return members;
	}

	@Override
	public String getName() {
		return name;
	}

	@Override
	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String getTeamData() {
		String data = "\nTeam name: " + name + "\nMembers: ";
		for (Person p : members) {
			data += "\n" + p.toString();
		}
		return data;
	}
}
